io.write('server/config.lua: configuring...\t')
--===========================================================

-- general configuration data
_VERSION = "v0.025 @ 2.12.08"
SERVER_STOP = false-- flag to set if server must be stoped.

handlers = {} -- table to store handler-functions, maps name to function
handlernames = {} -- inverse table, maps function to name

config = {}
config.encoding = 'win' -- !!! changes to config.encoding currently not fully supported, see comms.lua:EncodeReceivedWIN()
config.port = 4000  -- port for incoming connections
config.min_password_length = 5  -- password must be at least this long
config.max_password_tries = 3 -- how many times they can guess the password
config.max_output = 1024 -- maximum to send to client at one time
config.newline = "\n\r"
config.users_dir = "../server/profiles/"
config.commands_dir = "../server/commands/"
config.name = "Telnet Lua-(mud)-server ".._VERSION
config.unknown_command = "%q? Try typing 'help'."

-- config.newconnection = nil -- will be set to NewConnection@logon.lua

config.badaccnames = {}
-- table of ridiculous names
for _, v in pairs ({"new", "god", "admin", "save", "load", "exists", "unnamed"}) do config.badaccnames [v] = true end

-- messages we want to send
messages = {}
--@logon.lua:
messages.welcome = "Welcome, %s!"
messages.welcome2 = "Welcome to "..config.name
messages.yourname = "Your login? (Enter 'new' to create a new account)... "
messages.restartlogon = "Press <enter> to restart the connection process..."

-------------------------------------------------------------
--- writes log of server messages
-------------------------------------------------------------
function log(...)
	print('@S '..os.date("%X"),...)
end

-------------------------------------------------------------
--- returns server uptime
-------------------------------------------------------------
local starttime = os.clock()
function uptime(...)
	return os.difftime(os.clock(), starttime)
end
--===========================================================
io.write('[OK!]\n')